.class public Lcom/nemustech/regina/AppListImageMaker;
.super Ljava/lang/Object;
.source "AppListImageMaker.java"


# static fields
.field public static final SELECTED_IMAGE:I = 0x0

.field public static final UNSELECTED_IMAGE:I = 0x1

.field private static sCanvas:Landroid/graphics/Canvas;


# instance fields
.field private mAppListCol:I

.field private mAppListRow:I

.field private mDstRect:Landroid/graphics/Rect;

.field private mHeight:I

.field private mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

.field private mRes:Lcom/nemustech/regina/ResourceCare;

.field private mScreenHeight:I

.field private mScreenWidth:I

.field private mShortCutHeight:I

.field private mShortCutSidePadding:I

.field private mShortCutTopPadding:I

.field private mShortCutWidth:I

.field private mSrcRect:Landroid/graphics/Rect;

.field private mWidth:I


# direct methods
.method static constructor <clinit>()V
    .locals 1

    .prologue
    .line 31
    new-instance v0, Landroid/graphics/Canvas;

    invoke-direct {v0}, Landroid/graphics/Canvas;-><init>()V

    sput-object v0, Lcom/nemustech/regina/AppListImageMaker;->sCanvas:Landroid/graphics/Canvas;

    return-void
.end method

.method public constructor <init>(Lcom/nemustech/regina/ReginaLauncher;II)V
    .locals 2
    .parameter "reginaLauncher"
    .parameter "row"
    .parameter "col"

    .prologue
    const/4 v0, 0x4

    .line 37
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 19
    iput v0, p0, Lcom/nemustech/regina/AppListImageMaker;->mAppListRow:I

    .line 20
    iput v0, p0, Lcom/nemustech/regina/AppListImageMaker;->mAppListCol:I

    .line 33
    new-instance v0, Landroid/graphics/Rect;

    invoke-direct {v0}, Landroid/graphics/Rect;-><init>()V

    iput-object v0, p0, Lcom/nemustech/regina/AppListImageMaker;->mSrcRect:Landroid/graphics/Rect;

    .line 34
    new-instance v0, Landroid/graphics/Rect;

    invoke-direct {v0}, Landroid/graphics/Rect;-><init>()V

    iput-object v0, p0, Lcom/nemustech/regina/AppListImageMaker;->mDstRect:Landroid/graphics/Rect;

    .line 38
    iput-object p1, p0, Lcom/nemustech/regina/AppListImageMaker;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    .line 39
    iget-object v0, p0, Lcom/nemustech/regina/AppListImageMaker;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-static {v0}, Lcom/nemustech/regina/ResourceCare;->getResourceCare(Landroid/content/Context;)Lcom/nemustech/regina/ResourceCare;

    move-result-object v0

    iput-object v0, p0, Lcom/nemustech/regina/AppListImageMaker;->mRes:Lcom/nemustech/regina/ResourceCare;

    .line 40
    iput p2, p0, Lcom/nemustech/regina/AppListImageMaker;->mAppListRow:I

    .line 41
    iput p3, p0, Lcom/nemustech/regina/AppListImageMaker;->mAppListCol:I

    .line 43
    iget-object v0, p0, Lcom/nemustech/regina/AppListImageMaker;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-static {v0}, Lcom/nemustech/regina/RUtils;->getScreenWidthAvailable(Landroid/content/Context;)I

    move-result v0

    iput v0, p0, Lcom/nemustech/regina/AppListImageMaker;->mScreenWidth:I

    .line 44
    iget-object v0, p0, Lcom/nemustech/regina/AppListImageMaker;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-static {v0}, Lcom/nemustech/regina/RUtils;->getScreenHeightAvailable(Landroid/content/Context;)I

    move-result v0

    iput v0, p0, Lcom/nemustech/regina/AppListImageMaker;->mScreenHeight:I

    .line 46
    iget-object v0, p0, Lcom/nemustech/regina/AppListImageMaker;->mRes:Lcom/nemustech/regina/ResourceCare;

    const v1, 0x7f06008e

    invoke-virtual {v0, v1}, Lcom/nemustech/regina/ResourceCare;->getDimensionI(I)I

    move-result v0

    iput v0, p0, Lcom/nemustech/regina/AppListImageMaker;->mShortCutSidePadding:I

    .line 47
    iget-object v0, p0, Lcom/nemustech/regina/AppListImageMaker;->mRes:Lcom/nemustech/regina/ResourceCare;

    const v1, 0x7f06008f

    invoke-virtual {v0, v1}, Lcom/nemustech/regina/ResourceCare;->getDimensionI(I)I

    move-result v0

    iput v0, p0, Lcom/nemustech/regina/AppListImageMaker;->mShortCutTopPadding:I

    .line 49
    invoke-virtual {p0}, Lcom/nemustech/regina/AppListImageMaker;->getShortcutWidth()I

    move-result v0

    iput v0, p0, Lcom/nemustech/regina/AppListImageMaker;->mShortCutWidth:I

    .line 50
    invoke-virtual {p0}, Lcom/nemustech/regina/AppListImageMaker;->getShortcutHeight()I

    move-result v0

    iput v0, p0, Lcom/nemustech/regina/AppListImageMaker;->mShortCutHeight:I

    .line 52
    invoke-virtual {p0}, Lcom/nemustech/regina/AppListImageMaker;->getAppListWidth()I

    move-result v0

    iput v0, p0, Lcom/nemustech/regina/AppListImageMaker;->mWidth:I

    .line 53
    invoke-virtual {p0}, Lcom/nemustech/regina/AppListImageMaker;->getAppListHeight()I

    move-result v0

    iput v0, p0, Lcom/nemustech/regina/AppListImageMaker;->mHeight:I

    .line 54
    return-void
.end method


# virtual methods
.method public drawOnCanvas(Landroid/graphics/Canvas;Landroid/graphics/Bitmap;Ljava/lang/String;III)V
    .locals 29
    .parameter "canvas"
    .parameter "icon"
    .parameter "title"
    .parameter "indexInRow"
    .parameter "indexInCol"
    .parameter "mode"

    .prologue
    .line 123
    invoke-virtual/range {p0 .. p0}, Lcom/nemustech/regina/AppListImageMaker;->getShortcutTextTop()I

    move-result v23

    .line 124
    .local v23, textTop:I
    new-instance v18, Landroid/graphics/Paint;

    const/16 v24, 0x1

    move-object/from16 v0, v18

    move/from16 v1, v24

    invoke-direct {v0, v1}, Landroid/graphics/Paint;-><init>(I)V

    .line 125
    .local v18, paint:Landroid/graphics/Paint;
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/nemustech/regina/AppListImageMaker;->mRes:Lcom/nemustech/regina/ResourceCare;

    move-object/from16 v24, v0

    const/high16 v25, 0x105

    invoke-virtual/range {v24 .. v25}, Lcom/nemustech/regina/ResourceCare;->getDimensionI(I)I

    move-result v5

    .local v5, appIconHeight:I
    move v6, v5

    .line 127
    .local v6, appIconWidth:I
    move-object/from16 v0, p0

    iget v0, v0, Lcom/nemustech/regina/AppListImageMaker;->mShortCutWidth:I

    move/from16 v24, v0

    move-object/from16 v0, p0

    iget v0, v0, Lcom/nemustech/regina/AppListImageMaker;->mShortCutSidePadding:I

    move/from16 v25, v0

    add-int v24, v24, v25

    mul-int v16, v24, p4

    .line 128
    .local v16, offsetX:I
    move-object/from16 v0, p0

    iget v0, v0, Lcom/nemustech/regina/AppListImageMaker;->mShortCutHeight:I

    move/from16 v24, v0

    move-object/from16 v0, p0

    iget v0, v0, Lcom/nemustech/regina/AppListImageMaker;->mShortCutTopPadding:I

    move/from16 v25, v0

    add-int v24, v24, v25

    mul-int v17, v24, p5

    .line 130
    .local v17, offsetY:I
    move/from16 v0, v16

    int-to-float v0, v0

    move/from16 v24, v0

    move/from16 v0, v17

    int-to-float v0, v0

    move/from16 v25, v0

    move-object/from16 v0, p1

    move/from16 v1, v24

    move/from16 v2, v25

    invoke-virtual {v0, v1, v2}, Landroid/graphics/Canvas;->translate(FF)V

    .line 133
    if-nez p6, :cond_0

    .line 134
    new-instance v8, Landroid/graphics/Paint;

    const/16 v24, 0x1

    move-object v0, v8

    move/from16 v1, v24

    invoke-direct {v0, v1}, Landroid/graphics/Paint;-><init>(I)V

    .line 135
    .local v8, backgroundPaint:Landroid/graphics/Paint;
    const/16 v24, 0xff

    const/16 v25, 0x75

    const/16 v26, 0x98

    const/16 v27, 0x29

    move-object v0, v8

    move/from16 v1, v24

    move/from16 v2, v25

    move/from16 v3, v26

    move/from16 v4, v27

    invoke-virtual {v0, v1, v2, v3, v4}, Landroid/graphics/Paint;->setARGB(IIII)V

    .line 136
    new-instance v19, Landroid/graphics/RectF;

    const/16 v24, 0x0

    const/high16 v25, 0x3f80

    move-object/from16 v0, p0

    iget v0, v0, Lcom/nemustech/regina/AppListImageMaker;->mShortCutWidth:I

    move/from16 v26, v0

    move/from16 v0, v26

    int-to-float v0, v0

    move/from16 v26, v0

    move-object/from16 v0, p0

    iget v0, v0, Lcom/nemustech/regina/AppListImageMaker;->mShortCutHeight:I

    move/from16 v27, v0

    move/from16 v0, v27

    int-to-float v0, v0

    move/from16 v27, v0

    move-object/from16 v0, v19

    move/from16 v1, v24

    move/from16 v2, v25

    move/from16 v3, v26

    move/from16 v4, v27

    invoke-direct {v0, v1, v2, v3, v4}, Landroid/graphics/RectF;-><init>(FFFF)V

    .line 137
    .local v19, rectf:Landroid/graphics/RectF;
    const/high16 v24, 0x4170

    const/high16 v25, 0x4170

    move-object/from16 v0, p1

    move-object/from16 v1, v19

    move/from16 v2, v24

    move/from16 v3, v25

    move-object v4, v8

    invoke-virtual {v0, v1, v2, v3, v4}, Landroid/graphics/Canvas;->drawRoundRect(Landroid/graphics/RectF;FFLandroid/graphics/Paint;)V

    .line 141
    .end local v8           #backgroundPaint:Landroid/graphics/Paint;
    .end local v19           #rectf:Landroid/graphics/RectF;
    :cond_0
    invoke-virtual/range {p2 .. p2}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v24

    move/from16 v0, v24

    move v1, v6

    if-ne v0, v1, :cond_1

    invoke-virtual/range {p2 .. p2}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v24

    move/from16 v0, v24

    move v1, v5

    if-eq v0, v1, :cond_5

    .line 142
    :cond_1
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/nemustech/regina/AppListImageMaker;->mSrcRect:Landroid/graphics/Rect;

    move-object/from16 v24, v0

    const/16 v25, 0x0

    const/16 v26, 0x0

    invoke-virtual/range {p2 .. p2}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v27

    invoke-virtual/range {p2 .. p2}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v28

    invoke-virtual/range {v24 .. v28}, Landroid/graphics/Rect;->set(IIII)V

    .line 143
    move-object/from16 v0, p0

    iget v0, v0, Lcom/nemustech/regina/AppListImageMaker;->mShortCutWidth:I

    move/from16 v24, v0

    sub-int v24, v24, v6

    div-int/lit8 v10, v24, 0x2

    .line 146
    .local v10, dstLeft:I
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/nemustech/regina/AppListImageMaker;->mDstRect:Landroid/graphics/Rect;

    move-object/from16 v24, v0

    move-object/from16 v0, p0

    iget v0, v0, Lcom/nemustech/regina/AppListImageMaker;->mShortCutWidth:I

    move/from16 v25, v0

    sub-int v25, v25, v5

    add-int v26, v10, v6

    move-object/from16 v0, p0

    iget v0, v0, Lcom/nemustech/regina/AppListImageMaker;->mShortCutWidth:I

    move/from16 v27, v0

    move-object/from16 v0, v24

    move v1, v10

    move/from16 v2, v25

    move/from16 v3, v26

    move/from16 v4, v27

    invoke-virtual {v0, v1, v2, v3, v4}, Landroid/graphics/Rect;->set(IIII)V

    .line 147
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/nemustech/regina/AppListImageMaker;->mSrcRect:Landroid/graphics/Rect;

    move-object/from16 v24, v0

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/nemustech/regina/AppListImageMaker;->mDstRect:Landroid/graphics/Rect;

    move-object/from16 v25, v0

    move-object/from16 v0, p1

    move-object/from16 v1, p2

    move-object/from16 v2, v24

    move-object/from16 v3, v25

    move-object/from16 v4, v18

    invoke-virtual {v0, v1, v2, v3, v4}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;Landroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Paint;)V

    .line 153
    .end local v10           #dstLeft:I
    :goto_0
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/nemustech/regina/AppListImageMaker;->mRes:Lcom/nemustech/regina/ResourceCare;

    move-object/from16 v24, v0

    const v25, 0x7f06006f

    invoke-virtual/range {v24 .. v25}, Lcom/nemustech/regina/ResourceCare;->getDimensionI(I)I

    move-result v24

    move/from16 v0, v24

    int-to-float v0, v0

    move/from16 v24, v0

    move-object/from16 v0, v18

    move/from16 v1, v24

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setTextSize(F)V

    .line 154
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/nemustech/regina/AppListImageMaker;->mRes:Lcom/nemustech/regina/ResourceCare;

    move-object/from16 v24, v0

    const v25, 0x7f060070

    invoke-virtual/range {v24 .. v25}, Lcom/nemustech/regina/ResourceCare;->getDimensionI(I)I

    move-result v21

    .line 156
    .local v21, textLeftMargin:I
    const/16 v24, 0x2

    move/from16 v0, v24

    new-array v0, v0, [Ljava/lang/String;

    move-object v12, v0

    .line 159
    .local v12, iconNamesAtLine:[Ljava/lang/String;
    const/4 v15, 0x0

    .line 160
    .local v15, isMultiLines:Z
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/nemustech/regina/AppListImageMaker;->mRes:Lcom/nemustech/regina/ResourceCare;

    move-object/from16 v24, v0

    const v25, 0x7f060094

    invoke-virtual/range {v24 .. v25}, Lcom/nemustech/regina/ResourceCare;->getDimensionI(I)I

    move-result v13

    .line 161
    .local v13, iconTextInnerMargin:I
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/nemustech/regina/AppListImageMaker;->mRes:Lcom/nemustech/regina/ResourceCare;

    move-object/from16 v24, v0

    const v25, 0x7f060095

    invoke-virtual/range {v24 .. v25}, Lcom/nemustech/regina/ResourceCare;->getDimensionI(I)I

    move-result v14

    .line 163
    .local v14, iconTextInnerPadding:I
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/nemustech/regina/AppListImageMaker;->mRes:Lcom/nemustech/regina/ResourceCare;

    move-object/from16 v24, v0

    const v25, 0x7f060093

    invoke-virtual/range {v24 .. v25}, Lcom/nemustech/regina/ResourceCare;->getDimensionI(I)I

    move-result v22

    .line 164
    .local v22, textSize:I
    move-object/from16 v0, p0

    iget v0, v0, Lcom/nemustech/regina/AppListImageMaker;->mShortCutWidth:I

    move/from16 v24, v0

    mul-int/lit8 v25, v21, 0x4

    sub-int v24, v24, v25

    move-object/from16 v0, p0

    move-object/from16 v1, p3

    move-object v2, v12

    move/from16 v3, v24

    invoke-virtual {v0, v1, v2, v3}, Lcom/nemustech/regina/AppListImageMaker;->getIconNames(Ljava/lang/String;[Ljava/lang/String;I)V

    .line 165
    const/16 v24, 0x1

    aget-object v24, v12, v24

    const-string v25, ""

    invoke-virtual/range {v24 .. v25}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v24

    if-nez v24, :cond_2

    move-object v0, v12

    array-length v0, v0

    move/from16 v24, v0

    if-lez v24, :cond_2

    .line 166
    const/4 v15, 0x1

    .line 170
    :cond_2
    const/16 v24, 0x1

    move/from16 v0, p6

    move/from16 v1, v24

    if-ne v0, v1, :cond_3

    .line 171
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/nemustech/regina/AppListImageMaker;->mRes:Lcom/nemustech/regina/ResourceCare;

    move-object/from16 v24, v0

    const v25, 0x7f050002

    invoke-virtual/range {v24 .. v25}, Lcom/nemustech/regina/ResourceCare;->getColor(I)I

    move-result v24

    move-object/from16 v0, v18

    move/from16 v1, v24

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setColor(I)V

    .line 172
    const/4 v9, 0x0

    .line 173
    .local v9, bottom:F
    if-eqz v15, :cond_6

    .line 174
    mul-int/lit8 v24, v22, 0x2

    add-int v24, v24, v23

    mul-int/lit8 v25, v13, 0x2

    add-int v24, v24, v25

    add-int v24, v24, v14

    move/from16 v0, v24

    int-to-float v0, v0

    move v9, v0

    .line 178
    :goto_1
    new-instance v24, Landroid/graphics/RectF;

    const/16 v25, 0x0

    move/from16 v0, v23

    int-to-float v0, v0

    move/from16 v26, v0

    move-object/from16 v0, p0

    iget v0, v0, Lcom/nemustech/regina/AppListImageMaker;->mShortCutWidth:I

    move/from16 v27, v0

    move/from16 v0, v27

    int-to-float v0, v0

    move/from16 v27, v0

    move-object/from16 v0, v24

    move/from16 v1, v25

    move/from16 v2, v26

    move/from16 v3, v27

    move v4, v9

    invoke-direct {v0, v1, v2, v3, v4}, Landroid/graphics/RectF;-><init>(FFFF)V

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/nemustech/regina/AppListImageMaker;->mRes:Lcom/nemustech/regina/ResourceCare;

    move-object/from16 v25, v0

    const v26, 0x7f06006e

    invoke-virtual/range {v25 .. v26}, Lcom/nemustech/regina/ResourceCare;->getDimensionF(I)F

    move-result v25

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/nemustech/regina/AppListImageMaker;->mRes:Lcom/nemustech/regina/ResourceCare;

    move-object/from16 v26, v0

    const v27, 0x7f06006e

    invoke-virtual/range {v26 .. v27}, Lcom/nemustech/regina/ResourceCare;->getDimensionF(I)F

    move-result v26

    move-object/from16 v0, p1

    move-object/from16 v1, v24

    move/from16 v2, v25

    move/from16 v3, v26

    move-object/from16 v4, v18

    invoke-virtual {v0, v1, v2, v3, v4}, Landroid/graphics/Canvas;->drawRoundRect(Landroid/graphics/RectF;FFLandroid/graphics/Paint;)V

    .line 185
    .end local v9           #bottom:F
    :cond_3
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/nemustech/regina/AppListImageMaker;->mRes:Lcom/nemustech/regina/ResourceCare;

    move-object/from16 v24, v0

    const v25, 0x7f050001

    invoke-virtual/range {v24 .. v25}, Lcom/nemustech/regina/ResourceCare;->getColor(I)I

    move-result v24

    move-object/from16 v0, v18

    move/from16 v1, v24

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setColor(I)V

    .line 186
    sget-object v24, Landroid/graphics/Paint$Align;->CENTER:Landroid/graphics/Paint$Align;

    move-object/from16 v0, v18

    move-object/from16 v1, v24

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setTextAlign(Landroid/graphics/Paint$Align;)V

    .line 187
    invoke-virtual/range {v18 .. v18}, Landroid/graphics/Paint;->ascent()F

    move-result v24

    move/from16 v0, v24

    neg-float v0, v0

    move/from16 v24, v0

    move/from16 v0, v24

    float-to-double v0, v0

    move-wide/from16 v24, v0

    invoke-static/range {v24 .. v25}, Ljava/lang/Math;->ceil(D)D

    move-result-wide v24

    move-wide/from16 v0, v24

    double-to-int v0, v0

    move v7, v0

    .line 189
    .local v7, ascent:I
    const/16 v24, 0x0

    aget-object v24, v12, v24

    move-object/from16 v0, p0

    iget v0, v0, Lcom/nemustech/regina/AppListImageMaker;->mShortCutWidth:I

    move/from16 v25, v0

    div-int/lit8 v25, v25, 0x2

    move/from16 v0, v25

    int-to-float v0, v0

    move/from16 v25, v0

    add-int v26, v23, v7

    add-int v26, v26, v13

    move/from16 v0, v26

    int-to-float v0, v0

    move/from16 v26, v0

    move-object/from16 v0, p1

    move-object/from16 v1, v24

    move/from16 v2, v25

    move/from16 v3, v26

    move-object/from16 v4, v18

    invoke-virtual {v0, v1, v2, v3, v4}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V

    .line 190
    if-eqz v15, :cond_4

    .line 191
    mul-int/lit8 v24, v7, 0x2

    add-int v24, v24, v23

    add-int v24, v24, v13

    add-int v20, v24, v14

    .line 192
    .local v20, secondTop:I
    const/16 v24, 0x1

    aget-object v24, v12, v24

    move-object/from16 v0, p0

    iget v0, v0, Lcom/nemustech/regina/AppListImageMaker;->mShortCutWidth:I

    move/from16 v25, v0

    div-int/lit8 v25, v25, 0x2

    move/from16 v0, v25

    int-to-float v0, v0

    move/from16 v25, v0

    move/from16 v0, v20

    int-to-float v0, v0

    move/from16 v26, v0

    move-object/from16 v0, p1

    move-object/from16 v1, v24

    move/from16 v2, v25

    move/from16 v3, v26

    move-object/from16 v4, v18

    invoke-virtual {v0, v1, v2, v3, v4}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V

    .line 195
    .end local v20           #secondTop:I
    :cond_4
    move/from16 v0, v16

    neg-int v0, v0

    move/from16 v24, v0

    move/from16 v0, v24

    int-to-float v0, v0

    move/from16 v24, v0

    move/from16 v0, v17

    neg-int v0, v0

    move/from16 v25, v0

    move/from16 v0, v25

    int-to-float v0, v0

    move/from16 v25, v0

    move-object/from16 v0, p1

    move/from16 v1, v24

    move/from16 v2, v25

    invoke-virtual {v0, v1, v2}, Landroid/graphics/Canvas;->translate(FF)V

    .line 196
    return-void

    .line 149
    .end local v7           #ascent:I
    .end local v12           #iconNamesAtLine:[Ljava/lang/String;
    .end local v13           #iconTextInnerMargin:I
    .end local v14           #iconTextInnerPadding:I
    .end local v15           #isMultiLines:Z
    .end local v21           #textLeftMargin:I
    .end local v22           #textSize:I
    :cond_5
    move-object/from16 v0, p0

    iget v0, v0, Lcom/nemustech/regina/AppListImageMaker;->mShortCutWidth:I

    move/from16 v24, v0

    sub-int v11, v24, v5

    .line 150
    .local v11, dstTop:I
    move-object/from16 v0, p0

    iget v0, v0, Lcom/nemustech/regina/AppListImageMaker;->mShortCutWidth:I

    move/from16 v24, v0

    invoke-virtual/range {p2 .. p2}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v25

    sub-int v24, v24, v25

    div-int/lit8 v24, v24, 0x2

    move/from16 v0, v24

    int-to-float v0, v0

    move/from16 v24, v0

    move v0, v11

    int-to-float v0, v0

    move/from16 v25, v0

    move-object/from16 v0, p1

    move-object/from16 v1, p2

    move/from16 v2, v24

    move/from16 v3, v25

    move-object/from16 v4, v18

    invoke-virtual {v0, v1, v2, v3, v4}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;FFLandroid/graphics/Paint;)V

    goto/16 :goto_0

    .line 176
    .end local v11           #dstTop:I
    .restart local v9       #bottom:F
    .restart local v12       #iconNamesAtLine:[Ljava/lang/String;
    .restart local v13       #iconTextInnerMargin:I
    .restart local v14       #iconTextInnerPadding:I
    .restart local v15       #isMultiLines:Z
    .restart local v21       #textLeftMargin:I
    .restart local v22       #textSize:I
    :cond_6
    add-int v24, v23, v22

    mul-int/lit8 v25, v13, 0x2

    add-int v24, v24, v25

    move/from16 v0, v24

    int-to-float v0, v0

    move v9, v0

    goto/16 :goto_1
.end method

.method public getAppIcon(Lcom/nemustech/regina/AppInfo;I)Landroid/graphics/Bitmap;
    .locals 8
    .parameter "appInfo"
    .parameter "mode"

    .prologue
    const/4 v4, 0x0

    .line 88
    iget v0, p0, Lcom/nemustech/regina/AppListImageMaker;->mShortCutWidth:I

    iget v5, p0, Lcom/nemustech/regina/AppListImageMaker;->mShortCutHeight:I

    sget-object v6, Landroid/graphics/Bitmap$Config;->ARGB_8888:Landroid/graphics/Bitmap$Config;

    invoke-static {v0, v5, v6}, Landroid/graphics/Bitmap;->createBitmap(IILandroid/graphics/Bitmap$Config;)Landroid/graphics/Bitmap;

    move-result-object v7

    .line 89
    .local v7, bmp:Landroid/graphics/Bitmap;
    sget-object v1, Lcom/nemustech/regina/AppListImageMaker;->sCanvas:Landroid/graphics/Canvas;

    .line 90
    .local v1, canvas:Landroid/graphics/Canvas;
    invoke-virtual {v1, v7}, Landroid/graphics/Canvas;->setBitmap(Landroid/graphics/Bitmap;)V

    .line 91
    iget-object v0, p1, Lcom/nemustech/regina/AppInfo;->title:Ljava/lang/CharSequence;

    invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v3

    .line 92
    .local v3, title:Ljava/lang/String;
    iget-object v0, p0, Lcom/nemustech/regina/AppListImageMaker;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-virtual {v0}, Lcom/nemustech/regina/ReginaLauncher;->getAppInfoManager()Lcom/nemustech/regina/AppInfoManager;

    move-result-object v0

    invoke-virtual {v0, p1, v4}, Lcom/nemustech/regina/AppInfoManager;->getBitmap(Lcom/nemustech/regina/AppInfo;Z)Landroid/graphics/Bitmap;

    move-result-object v2

    .local v2, icon:Landroid/graphics/Bitmap;
    move-object v0, p0

    move v5, v4

    move v6, p2

    .line 93
    invoke-virtual/range {v0 .. v6}, Lcom/nemustech/regina/AppListImageMaker;->drawOnCanvas(Landroid/graphics/Canvas;Landroid/graphics/Bitmap;Ljava/lang/String;III)V

    .line 94
    return-object v7
.end method

.method public getAppIcons(Ljava/util/List;I)Landroid/graphics/Bitmap;
    .locals 12
    .parameter
    .parameter "pageIndex"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List",
            "<",
            "Lcom/nemustech/regina/AppInfo;",
            ">;I)",
            "Landroid/graphics/Bitmap;"
        }
    .end annotation

    .prologue
    .line 98
    .local p1, appInfos:Ljava/util/List;,"Ljava/util/List<Lcom/nemustech/regina/AppInfo;>;"
    iget v0, p0, Lcom/nemustech/regina/AppListImageMaker;->mWidth:I

    iget v1, p0, Lcom/nemustech/regina/AppListImageMaker;->mHeight:I

    sget-object v2, Landroid/graphics/Bitmap$Config;->ARGB_8888:Landroid/graphics/Bitmap$Config;

    invoke-static {v0, v1, v2}, Landroid/graphics/Bitmap;->createBitmap(IILandroid/graphics/Bitmap$Config;)Landroid/graphics/Bitmap;

    move-result-object v8

    .line 99
    .local v8, bmp:Landroid/graphics/Bitmap;
    sget-object v1, Lcom/nemustech/regina/AppListImageMaker;->sCanvas:Landroid/graphics/Canvas;

    .line 100
    .local v1, canvas:Landroid/graphics/Canvas;
    invoke-virtual {v1, v8}, Landroid/graphics/Canvas;->setBitmap(Landroid/graphics/Bitmap;)V

    .line 102
    add-int/lit8 v0, p2, 0x1

    iget v2, p0, Lcom/nemustech/regina/AppListImageMaker;->mAppListRow:I

    mul-int/2addr v0, v2

    iget v2, p0, Lcom/nemustech/regina/AppListImageMaker;->mAppListCol:I

    mul-int/2addr v0, v2

    add-int/lit8 v0, v0, 0x1

    invoke-interface {p1}, Ljava/util/List;->size()I

    move-result v2

    invoke-static {v0, v2}, Ljava/lang/Math;->min(II)I

    move-result v10

    .line 103
    .local v10, size:I
    iget v0, p0, Lcom/nemustech/regina/AppListImageMaker;->mAppListRow:I

    mul-int/2addr v0, p2

    iget v2, p0, Lcom/nemustech/regina/AppListImageMaker;->mAppListCol:I

    mul-int v11, v0, v2

    .line 106
    .local v11, startIndex:I
    const/4 v5, 0x0

    .local v5, y:I
    :goto_0
    iget v0, p0, Lcom/nemustech/regina/AppListImageMaker;->mAppListRow:I

    if-ge v5, v0, :cond_1

    .line 107
    const/4 v4, 0x0

    .local v4, x:I
    :goto_1
    iget v0, p0, Lcom/nemustech/regina/AppListImageMaker;->mAppListCol:I

    if-ge v4, v0, :cond_0

    .line 108
    add-int v0, v11, v4

    iget v2, p0, Lcom/nemustech/regina/AppListImageMaker;->mAppListCol:I

    mul-int/2addr v2, v5

    add-int v9, v0, v2

    .line 109
    .local v9, position:I
    if-ge v9, v10, :cond_0

    .line 110
    invoke-interface {p1, v9}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v7

    check-cast v7, Lcom/nemustech/regina/AppInfo;

    .line 111
    .local v7, appInfo:Lcom/nemustech/regina/AppInfo;
    iget-object v0, v7, Lcom/nemustech/regina/AppInfo;->title:Ljava/lang/CharSequence;

    invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v3

    .line 112
    .local v3, title:Ljava/lang/String;
    iget-object v0, p0, Lcom/nemustech/regina/AppListImageMaker;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-virtual {v0}, Lcom/nemustech/regina/ReginaLauncher;->getAppInfoManager()Lcom/nemustech/regina/AppInfoManager;

    move-result-object v0

    const/4 v2, 0x1

    invoke-virtual {v0, v7, v2}, Lcom/nemustech/regina/AppInfoManager;->getBitmap(Lcom/nemustech/regina/AppInfo;Z)Landroid/graphics/Bitmap;

    move-result-object v2

    .line 113
    .local v2, icon:Landroid/graphics/Bitmap;
    const/4 v6, 0x1

    move-object v0, p0

    invoke-virtual/range {v0 .. v6}, Lcom/nemustech/regina/AppListImageMaker;->drawOnCanvas(Landroid/graphics/Canvas;Landroid/graphics/Bitmap;Ljava/lang/String;III)V

    .line 107
    add-int/lit8 v4, v4, 0x1

    goto :goto_1

    .line 106
    .end local v2           #icon:Landroid/graphics/Bitmap;
    .end local v3           #title:Ljava/lang/String;
    .end local v7           #appInfo:Lcom/nemustech/regina/AppInfo;
    .end local v9           #position:I
    :cond_0
    add-int/lit8 v5, v5, 0x1

    goto :goto_0

    .line 118
    .end local v4           #x:I
    :cond_1
    return-object v8
.end method

.method public getAppListHeight()I
    .locals 4

    .prologue
    .line 66
    invoke-virtual {p0}, Lcom/nemustech/regina/AppListImageMaker;->getShortcutHeight()I

    move-result v0

    iget v1, p0, Lcom/nemustech/regina/AppListImageMaker;->mAppListCol:I

    mul-int/2addr v0, v1

    iget v1, p0, Lcom/nemustech/regina/AppListImageMaker;->mShortCutTopPadding:I

    iget v2, p0, Lcom/nemustech/regina/AppListImageMaker;->mAppListCol:I

    const/4 v3, 0x1

    sub-int/2addr v2, v3

    mul-int/2addr v1, v2

    add-int/2addr v0, v1

    return v0
.end method

.method public getAppListWidth()I
    .locals 3

    .prologue
    .line 57
    iget-object v1, p0, Lcom/nemustech/regina/AppListImageMaker;->mRes:Lcom/nemustech/regina/ResourceCare;

    const v2, 0x7f06008b

    invoke-virtual {v1, v2}, Lcom/nemustech/regina/ResourceCare;->getDimensionI(I)I

    move-result v0

    .line 58
    .local v0, sideMargin:I
    iget v1, p0, Lcom/nemustech/regina/AppListImageMaker;->mScreenWidth:I

    mul-int/lit8 v2, v0, 0x2

    sub-int/2addr v1, v2

    return v1
.end method

.method public getIconNames(Ljava/lang/String;[Ljava/lang/String;I)V
    .locals 12
    .parameter "iconName"
    .parameter "resultSet"
    .parameter "textWidth"

    .prologue
    .line 199
    new-instance v8, Landroid/text/TextPaint;

    const/4 v10, 0x1

    invoke-direct {v8, v10}, Landroid/text/TextPaint;-><init>(I)V

    .line 200
    .local v8, tp:Landroid/text/TextPaint;
    iget-object v10, p0, Lcom/nemustech/regina/AppListImageMaker;->mRes:Lcom/nemustech/regina/ResourceCare;

    const v11, 0x7f06006f

    invoke-virtual {v10, v11}, Lcom/nemustech/regina/ResourceCare;->getDimensionI(I)I

    move-result v10

    int-to-float v10, v10

    invoke-virtual {v8, v10}, Landroid/text/TextPaint;->setTextSize(F)V

    .line 202
    invoke-virtual {p1}, Ljava/lang/String;->length()I

    move-result v10

    new-array v9, v10, [F

    .line 203
    .local v9, widths:[F
    invoke-virtual {v8, p1, v9}, Landroid/text/TextPaint;->getTextWidths(Ljava/lang/String;[F)I

    .line 204
    const/4 v7, 0x0

    .line 205
    .local v7, totalWidth:F
    const/4 v3, 0x0

    .line 206
    .local v3, fivot:I
    move-object v0, v9

    .local v0, arr$:[F
    array-length v5, v0

    .local v5, len$:I
    const/4 v4, 0x0

    .local v4, i$:I
    :goto_0
    if-ge v4, v5, :cond_0

    aget v1, v0, v4

    .line 207
    .local v1, f:F
    add-float/2addr v7, v1

    .line 208
    add-int/lit8 v3, v3, 0x1

    .line 209
    int-to-float v10, p3

    cmpl-float v10, v7, v10

    if-ltz v10, :cond_3

    .line 212
    .end local v1           #f:F
    :cond_0
    const/4 v10, 0x0

    invoke-virtual {p1, v10, v3}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v2

    .line 213
    .local v2, firstLine:Ljava/lang/String;
    const/4 v6, 0x0

    .line 215
    .local v6, secondLine:Ljava/lang/String;
    invoke-virtual {v2}, Ljava/lang/String;->length()I

    move-result v10

    invoke-virtual {p1}, Ljava/lang/String;->length()I

    move-result v11

    if-eq v10, v11, :cond_4

    const-string v10, " "

    invoke-virtual {v2, v10}, Ljava/lang/String;->lastIndexOf(Ljava/lang/String;)I

    move-result v10

    if-lez v10, :cond_4

    .line 216
    const-string v10, " "

    invoke-virtual {v2, v10}, Ljava/lang/String;->lastIndexOf(Ljava/lang/String;)I

    move-result v10

    add-int/lit8 v10, v10, 0x1

    invoke-virtual {p1}, Ljava/lang/String;->length()I

    move-result v11

    invoke-virtual {p1, v10, v11}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v6

    .line 217
    const/4 v10, 0x0

    const-string v11, " "

    invoke-virtual {v2, v11}, Ljava/lang/String;->lastIndexOf(Ljava/lang/String;)I

    move-result v11

    invoke-virtual {v2, v10, v11}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v2

    .line 222
    :goto_1
    invoke-virtual {p1}, Ljava/lang/String;->length()I

    move-result v10

    invoke-virtual {v2}, Ljava/lang/String;->length()I

    move-result v11

    sub-int/2addr v10, v11

    if-lez v10, :cond_2

    .line 223
    invoke-virtual {v2}, Ljava/lang/String;->length()I

    move-result v10

    invoke-virtual {p1}, Ljava/lang/String;->length()I

    move-result v11

    invoke-virtual {p1, v10, v11}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v6

    .line 224
    const-string v10, " "

    invoke-virtual {v6, v10}, Ljava/lang/String;->indexOf(Ljava/lang/String;)I

    move-result v10

    if-nez v10, :cond_1

    .line 225
    const/4 v10, 0x1

    invoke-virtual {v6}, Ljava/lang/String;->length()I

    move-result v11

    invoke-virtual {v6, v10, v11}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v6

    .line 226
    :cond_1
    int-to-float v10, p3

    sget-object v11, Landroid/text/TextUtils$TruncateAt;->END:Landroid/text/TextUtils$TruncateAt;

    invoke-static {v6, v8, v10, v11}, Landroid/text/TextUtils;->ellipsize(Ljava/lang/CharSequence;Landroid/text/TextPaint;FLandroid/text/TextUtils$TruncateAt;)Ljava/lang/CharSequence;

    move-result-object v10

    invoke-virtual {v10}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v6

    .line 228
    :cond_2
    const/4 v10, 0x0

    aput-object v2, p2, v10

    .line 229
    const/4 v10, 0x1

    aput-object v6, p2, v10

    .line 230
    return-void

    .line 206
    .end local v2           #firstLine:Ljava/lang/String;
    .end local v6           #secondLine:Ljava/lang/String;
    .restart local v1       #f:F
    :cond_3
    add-int/lit8 v4, v4, 0x1

    goto :goto_0

    .line 219
    .end local v1           #f:F
    .restart local v2       #firstLine:Ljava/lang/String;
    .restart local v6       #secondLine:Ljava/lang/String;
    :cond_4
    invoke-virtual {v2}, Ljava/lang/String;->length()I

    move-result v10

    invoke-virtual {p1}, Ljava/lang/String;->length()I

    move-result v11

    invoke-virtual {p1, v10, v11}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v6

    goto :goto_1
.end method

.method public getShortcutHeight()I
    .locals 4

    .prologue
    .line 76
    invoke-virtual {p0}, Lcom/nemustech/regina/AppListImageMaker;->getShortcutWidth()I

    move-result v0

    .line 77
    .local v0, scWidth:I
    iget-object v1, p0, Lcom/nemustech/regina/AppListImageMaker;->mRes:Lcom/nemustech/regina/ResourceCare;

    const v2, 0x7f06006b

    invoke-virtual {v1, v2}, Lcom/nemustech/regina/ResourceCare;->getDimensionI(I)I

    move-result v1

    add-int/2addr v1, v0

    iget-object v2, p0, Lcom/nemustech/regina/AppListImageMaker;->mRes:Lcom/nemustech/regina/ResourceCare;

    const v3, 0x7f060093

    invoke-virtual {v2, v3}, Lcom/nemustech/regina/ResourceCare;->getDimensionI(I)I

    move-result v2

    mul-int/lit8 v2, v2, 0x2

    add-int/2addr v1, v2

    iget-object v2, p0, Lcom/nemustech/regina/AppListImageMaker;->mRes:Lcom/nemustech/regina/ResourceCare;

    const v3, 0x7f060094

    invoke-virtual {v2, v3}, Lcom/nemustech/regina/ResourceCare;->getDimensionI(I)I

    move-result v2

    mul-int/lit8 v2, v2, 0x2

    add-int/2addr v1, v2

    iget-object v2, p0, Lcom/nemustech/regina/AppListImageMaker;->mRes:Lcom/nemustech/regina/ResourceCare;

    const v3, 0x7f060095

    invoke-virtual {v2, v3}, Lcom/nemustech/regina/ResourceCare;->getDimensionI(I)I

    move-result v2

    mul-int/lit8 v2, v2, 0x2

    add-int/2addr v1, v2

    return v1
.end method

.method public getShortcutTextTop()I
    .locals 4

    .prologue
    .line 84
    invoke-virtual {p0}, Lcom/nemustech/regina/AppListImageMaker;->getShortcutWidth()I

    move-result v0

    int-to-double v0, v0

    const-wide/high16 v2, 0x3ff0

    mul-double/2addr v0, v2

    double-to-int v0, v0

    iget-object v1, p0, Lcom/nemustech/regina/AppListImageMaker;->mRes:Lcom/nemustech/regina/ResourceCare;

    const v2, 0x7f06006b

    invoke-virtual {v1, v2}, Lcom/nemustech/regina/ResourceCare;->getDimensionI(I)I

    move-result v1

    add-int/2addr v0, v1

    return v0
.end method

.method public getShortcutWidth()I
    .locals 4

    .prologue
    .line 71
    invoke-virtual {p0}, Lcom/nemustech/regina/AppListImageMaker;->getAppListWidth()I

    move-result v1

    iget v2, p0, Lcom/nemustech/regina/AppListImageMaker;->mAppListCol:I

    const/4 v3, 0x1

    sub-int/2addr v2, v3

    iget v3, p0, Lcom/nemustech/regina/AppListImageMaker;->mShortCutSidePadding:I

    mul-int/2addr v2, v3

    sub-int/2addr v1, v2

    iget v2, p0, Lcom/nemustech/regina/AppListImageMaker;->mAppListCol:I

    div-int v0, v1, v2

    .line 72
    .local v0, width:I
    return v0
.end method
